import { legacy_createStore as createStore, applyMiddleware } from 'redux';
// 日志处理中间件
import logger from 'redux-logger';
// thunk 中间件
import thunk from 'redux-thunk';
// 浏览器查看 redux 数据插件
import { composeWithDevTools } from 'redux-devtools-extension';

import { rootReducer } from './reducers';

export const store = createStore(
  rootReducer,
  composeWithDevTools(applyMiddleware(thunk))
);
